using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

namespace RobotPratolSolution.Converters
{
    public class ControlModeToColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (string.Equals(value?.ToString(), parameter?.ToString(), StringComparison.OrdinalIgnoreCase))
            {
                return new SolidColorBrush(Colors.LightGreen);
            }
            return new SolidColorBrush(Colors.Transparent);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    //public class ControlModeToColorConverter : IValueConverter
    //{
    //    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    //    {
    //        if (string.Equals(value?.ToString(), parameter?.ToString(), StringComparison.OrdinalIgnoreCase))
    //        {
    //            return new SolidColorBrush(Colors.LightGreen);
    //        }
    //        return new SolidColorBrush(Colors.Transparent);
    //    }

    //    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    //    {
    //        throw new NotImplementedException();
    //    }
    //}


}